/**
 * @param {number[][]} piles
 * @param {number} k
 * @return {number}
 */
 var maxValueOfCoins = function(piles, k) {
  const n = piles.length
  const dp = new Array(k+1).fill().map(() => new Array(n).fill(0))
  for(let i = 1; i<=k; i++) {
    for(let j = 0; j<n; j++) {
      dp[i][j] = 
    }
  } 
};